package com.axin.common.exception;

/**
 * 
 * @Description: TODO 
 * @ClassName:  ApiException
 * @author:  Axin 
 * @date:   2019年3月9日 下午11:25:34   
 * @Copyright: 2019 www.hao456.top Inc. All rights reserved.
 */

public class ApiException extends RuntimeException {

    final String errCode;

    public ApiException(String errCode, String errMsg) {
        super(errMsg);
        this.errCode = errCode;
    }

    public ApiException(Exception e) {
        super(e);
        this.errCode = e.getClass().getName();
    }

    public String getErrCode() {
        return this.errCode;
    }

}
